import request from '@/utils/request'


export function getCourseListAll() {
  return request({
    url: '/school/course/courseAll',
    method: 'get'
  })
}
export function getSchoolCourse(schoolId) {
  return request({
    url: `/school/course/schoolCourse/${schoolId}`,
    method: 'get'
  })
}

// 查询所授课程类型列表
export function listCourse(query) {
  return request({
    url: '/school/course/list',
    method: 'get',
    params: query
  })
}

// 查询所授课程类型详细
export function getCourse(courseId) {
  return request({
    url: '/school/course/' + courseId,
    method: 'get'
  })
}

// 新增所授课程类型
export function addCourse(data) {
  return request({
    url: '/school/course',
    method: 'post',
    data: data
  })
}
// x新增或修改 校区所授课程
export function updateSchoolCourse(schoolId,data) {
  return request({
    url: '/school/course/updateSchoolCourse/'+schoolId,
    method: 'post',
    data: data
  })
}


// 修改所授课程类型
export function updateCourse(data) {
  return request({
    url: '/school/course',
    method: 'put',
    data: data
  })
}

// 删除所授课程类型
export function delCourse(courseId) {
  return request({
    url: '/school/course/' + courseId,
    method: 'delete'
  })
}

// 导出所授课程类型
export function exportCourse(query) {
  return request({
    url: '/school/course/export',
    method: 'get',
    params: query
  })
}
